<template>
  <div class="positionItem">
    <div class="main" @click="openContent(item.id)">
      <div class="left">
        <div class="title">{{ item.name }}</div>
        <div class="info">
          <div class="city">{{ item.city }}</div>
          <div class="year">{{ item.experience }}</div>
          <div class="xue">{{ item.education }}</div>
        </div>
      </div>
      <div class="right">{{ item.salary }}</div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['item'],
  methods: {
    // 点击跳转到详情
    openContent (index) {
      this.$router.push(`/positionDetail/${index}`)
    }
  }
}
</script>

<style lang="less" scoped>
.positionItem {
  width: 100%;
  .main {
    height: 100px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgb(241, 240, 240);
    padding: 20px;
    box-sizing: border-box;

    .left {
      .title {
        font-size: 18px;
        font-weight: 700;
      }
      .info {
        display: flex;
        margin-top: 10px;
        div {
          background-color: rgb(236, 234, 234);
          color: rgb(146, 146, 146);
          padding: 2px 4px;
          font-size: 14px;
          border-radius: 6px;
        }
        .year {
          margin: 0 10px;
        }
      }
    }
    .right {
      color: red;
    }
  }
}
</style>
